package com.g3d.types;

public class G3DVertex2 
{

	public G3DVertex2()
	{
		this.x = 0.0f;
		this.y = 0.0f;
		this.tU = 0.0f;
		this.tV = 0.0f;
		this.color = new G3DColor(1, 1, 1, 1);
	}
	
	public G3DVertex2(float x, float y, float tU, float tV, G3DColor color)
	{
		this.x = x;
		this.y = y;
		this.tU = tU;
		this.tV = tV;
		this.color = color.clone();
	}
	
	public G3DVertex2(G3DVector2 position, G3DVector2 tile, G3DColor color)
	{
		this.x = position.x;
		this.y = position.y;
		this.tU = tile.x;
		this.tV = tile.y;
		this.color = color.clone();
	}
	
	public G3DVertex2 clone()
	{
		return new G3DVertex2(this.x, this.y, this.tU, this.tV, this.color.clone());
	}
	
	public G3DVector2 position()
	{
		return new G3DVector2(this.x, this.y);
	}
	
	public G3DVector2 tile()
	{
		return new G3DVector2(this.tU, this.tV);
	}
	
	public float x;
	public float y;
	public float tU;
	public float tV;
	public G3DColor color;
}
